.hr-page {
  min-height: 100vh;
  position: relative;
  padding: 24rpx;
  box-sizing: border-box;
}

/* 背景图片 */
.bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
}

/* 自定义透明导航栏 */
.custom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  padding: 20rpx 24rpx 16rpx;
  padding-top: calc(60rpx + env(safe-area-inset-top));
  position: relative;
  z-index: 10;
}

.nav-left, .nav-right {
  width: 60rpx;
  height: 60rpx;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-title {
  font-size: 32rpx;
  font-weight: 600;
  color: #111;
  text-align: center;
  flex: 1;
}

.nav-right {
  opacity: 0.7;
}

/* 页面内容区域恢复原来的padding */

/* 用户头像条 */
.user-banner {
  position: relative;
  width: 100%;
  border-radius: 16rpx;
  margin-top: 50rpx;
  margin-bottom: 0;
  overflow: visible;
  z-index: 1;
}

.banner-bg {
  width: 100%;
  height: auto;
  display: block;
}

.banner-content {
  position: absolute;
  top: 16rpx;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding: 0 24rpx;
  z-index: 1;
  pointer-events: none;
}

.user-avatar {
  width: 52rpx;
  height: 52rpx;
  border-radius: 50%;
  border: 2rpx solid rgba(255, 255, 255, 0.3);
  margin-right: 14rpx;
  background: #fff;
  flex-shrink: 0;
  pointer-events: auto;
}

.user-name {
  font-size: 28rpx;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 1rpx;
  text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.card {
  background: #ffffff;
  border-radius: 16rpx;
  padding: 24rpx 16rpx;
  box-shadow: 0 8rpx 24rpx rgba(0,0,0,.06);
  margin-top: -40rpx;
  margin-bottom: 20rpx;
  position: relative;
  z-index: 2;
}

/* 时间粒度选择器 */
.time-selector {
  margin-bottom: 20rpx;
}

.time-tabs {
  display: flex;
  background: #ECF6FC;
  border: 1rpx solid #DEEBF2;
  border-radius: 100rpx;
  padding: 4rpx;
}

.time-tab {
  flex: 1;
  text-align: center;
  padding: 8rpx 32rpx;
  font-size: 24rpx;
  color: #666;
  border-radius: 100rpx;
  transition: all 0.3s ease;
}

.time-tab.active {
  background: #0093D2;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6rpx 12rpx rgba(0, 147, 210, 0.2), 0 2rpx 4rpx rgba(0, 147, 210, 0.1);
}

/* 日期选择器 */
.date-selector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24rpx;
  padding: 0 8rpx;
}

.date-display {
  display: flex;
  align-items: center;
  gap: 4rpx;
}

.date-text {
  font-size: 28rpx;
  color: #111;
  font-weight: 400;
}

.chart-wrapper {
  margin-top: 0;
}

/* 隐藏 bp-chart 组件内部的时间选择器和日期选择器 */
.chart-wrapper .chart-container .time-selector,
.chart-wrapper .chart-container .date-selector {
  display: none;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16rpx;
  margin-bottom: 24rpx;
  padding-bottom: 24rpx;
  border-bottom: 1rpx solid #f0f0f0;
}
.stat-box {
  background: #f7fbff;
  border-radius: 12rpx;
  padding: 16rpx;
}
.stat-box-single {
  background: #f0f8ff;
  border-radius: 12rpx;
  padding: 16rpx;
  grid-column: 1 / -1;
  text-align: center;
}
.stat-title { font-size: 22rpx; color: #6b7a90; }
.stat-value { font-size: 36rpx; color: #111; font-weight: 700; margin: 6rpx 0; }
.stat-unit { font-size: 20rpx; color: #98a3b3; }

/* 血氧详细统计 */
.oxygen-stats {
  margin-top: 24rpx;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20rpx 50rpx 20rpx 20rpx;
  background: #f0f8ff;
  border-radius: 12rpx;
  margin-bottom: 16rpx;
}

.stat-item:last-child {
  margin-bottom: 0;
}

.stat-label {
  font-size: 28rpx;
  color: #333;
  font-weight: 400;
}

.stat-data {
  font-size: 28rpx;
  color: #333;
  font-weight: 600;
}

.section {
  background: #ffffff;
  border-radius: 16rpx;
  padding: 16rpx;
  box-shadow: 0 8rpx 24rpx rgba(0,0,0,.06);
}
.section-title { font-size: 28rpx; font-weight: 700; color: #111; margin-bottom: 8rpx; }
.pie-placeholder { display: flex; align-items: center; gap: 32rpx; padding: 20rpx 0; justify-content: flex-start; padding-left: 60rpx; }
.ring { width: 150rpx; height: 150rpx; border-radius: 50%; background: conic-gradient(#0aa0ff 0 50%, #6fcf97 50% 100%); position: relative; flex-shrink: 0; }
.ring::after { content: '文本标签'; position: absolute; inset: 22rpx; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #6b7a90; font-size: 20rpx; }
.legend { display: flex; flex-direction: column; gap: 12rpx; color: #333; font-size: 26rpx; flex: 1; align-items: flex-start; margin-left: 100rpx; }
.legend-item { display: flex; align-items: center; gap: 12rpx; justify-content: flex-start; }
.legend-text { display: flex; align-items: center; gap: 8rpx; }
.legend-label { min-width: 120rpx; text-align: left; }
.legend-value { text-align: left; }
.dot { width: 16rpx; height: 16rpx; border-radius: 50%; }
.dot.mild { background: #0aa0ff; }
.dot.normal { background: #6fcf97; }
